<template>
  <div class="materialDialog">
    <el-dialog :visible.sync="dialogVisibleInner" top="5vh" v-el-drag-dialog :close-on-press-escape="false"
      :close-on-click-modal="false" @close="handleClose" class="custom-dialog">
      <el-divider content-position="left">基本信息</el-divider>
      <el-form class="rule-container" label-width="100px">
        <div class="rule-content">

        </div>
      </el-form>
      <!-- 分割线与dialog-footer的间距 -->
      <el-divider class="lineToFooter"></el-divider>
      <template #footer>
        <span class="dialog-footer">
          <el-button type="primary" @click="handleSubmit">
            确认
          </el-button>
          <el-button type="info" @click="handleClose">关闭</el-button>
        </span>
      </template>
    </el-dialog>
  </div>
</template>

<script>
import elDragDialog from "@/directive/el-drag-dialog";
export default {
  directives: {
    elDragDialog
  },
  data() {
    return {
      dialogVisibleInner: false
    }
  },
  props: {
    dialogVisible: Boolean
  },
  watch: {
    dialogVisible(newwVal) {
      this.dialogVisibleInner = newwVal;
    }
  },
  methods: {
    handleSubmit() {
      this.dialogVisibleInner = false;
      this.$emit('closeDialog');
    },
    handleClose() {
      this.dialogVisibleInner = false;
      this.$emit('closeDialog');
    }
  }
}
</script>

<style></style>